package com.magicode.screen.settingutil;

import android.content.Context;

import com.magicode.screen.AppConfig;
import com.magicode.screen.AppContext;

/**
 * 退出登录
 */
public class UserExitUtil {
    private Context context;
    public UserExitUtil(Context context){
        this.context=context;
    }

    //退出登录
    public boolean appExit(){
        try {
            AppContext.set(AppConfig.KEY_NOTIFICATION_DISABLE_WHEN_EXIT, false);
 //           AppManager.getAppManager().AppExit(context);不杀死app进程
            AppContext.getInstance().Logout();
//            ((Activity) context).finish();
            return true;
        }catch (Exception e){
            return false;
        }
    }
}
